Detecting and Tracking Touch on an Illuminated Surface

ABSTRACT

A method for touch detection is provided that includes receiving an image of an illuminated surface of an optical touch detection system, wherein the image is captured by a camera in the optical touch detection system, identifying highly saturated pixels in the image, identifying a set of candidate touch locations in the image, classifying the candidate touch locations in the set of candidate touch locations to generate a set of validated candidate touch locations, pruning the set of validated candidate touch locations based on the identified highly saturated pixels to generate a set of final touch locations, wherein a validated candidate touch location is not included in the set of final touch locations if the validated candidate touch location corresponds to a highly saturated pixel, and outputting the set of final touch locations.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims benefit of U.S. Provisional Patent ApplicationSer. No. 61/610,867, filed Mar. 14, 2012, which is incorporated hereinby reference in its entirety. This application is related to co-pendingU.S. patent application Ser. No. ______ (attorney docket numberTI-73604), filed Mar. ______, 2013, co-pending U.S. patent applicationSer. No. ______ (attorney docket number TI-73605), filed Mar. 14, 2013,co-pending U.S. patent application Ser. No. ______ (attorney docketnumber TI-72135), filed Mar. 14, 2013, and co-pending U.S. patentapplication Ser. No. ______ (attorney docket number TI-72136), filedMar. 14, 2013, which are incorporated by reference herein in theirentirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the present invention generally relate to detecting andtracking touch on an illuminated surface.

2. Description of the Related Art

Touch displays are used in many consumer applications (e.g., smartphones, computer displays, medical imaging devices, automotive controldisplays, etc.) to provide an intuitive user interface. The touchdetection technology used in such displays includes electricalcapacitance detection, electrical resistance detection, and opticaldetection. For optical touch detection, one or more imaging sensors andone or more light sources (e.g., one or more infrared cameras andinfrared light-emitting diodes (LEDs)) may be used to capture images ofa touch surface. The captured images are processed to detect objects(e.g., a finger or a stylus) touching or near the surface.

Examples of such optical touch detection systems include an infrared(IR) rear-projection touch system, an IR curtain touch system, and afrustrated total internal reflection system. A typical IRrear-projection touch system includes a projector, a display screen(also referred to as a touch screen or touch surface), infra-redemitters (e.g., LEDs), one or more infra-red sensors (e.g., cameras),and a processing engine. The IR emitters flood the rear surface of thedisplay screen with IR light. Some portion of the IR light rays passesthrough (refracts) the display screen while the remaining light bouncesoff (reflects) the screen. The IR camera or cameras create an image fromthe IR light that makes it back to the sensor. When an object touchesthe screen, it reflects some of the IR light rays emerging from thescreen back through the screen surface toward the IR sensor. The imagescaptured by the camera are analyzed to detect the presence and location(x, y coordinates) of the touch.

In an IR curtain touch system, a curtain of IR light is cast over thetouch surface such that the plane of the IR curtain is close to andparallel to the surface while not actually touching the surface. When anobject touches the surface, the object breaks the light curtain and IRlight reflects off the object. Some of this reflected light is capturedby one or more IR cameras located on the same side of the touch surfaceas the light curtain. The IR camera or cameras create an image from theIR light that makes it back to the sensor. The images captured by thecamera are analyzed to detect the presence and location (x, ycoordinates) of the touch.

In a frustrated total internal reflection system, one or more IR lightsources flood the inside of the screen with infrared light based on theprinciple of total internal reflection. This light undergoes completereflections off either surface of the screen and remains trapped insidethe material of the screen (usually, acrylic). When a user touches thescreen, some of the light rays at the point of contact, instead of beingfully reflected, pass through the surface and reflect off the contactmaterial (usually, the user's skin). This frustrated light is thenscattered down, away from the contact point, through the screen, andtoward an IR camera, which creates an image from the IR light impinginga sensor or sensors in the camera. These light rays create a bright spoton the otherwise dark image. The images thus captured by the camera areanalyzed to detect the presence and location of the touch point. In afrustrated total internal reflection system, typically the projector andIR camera are placed behind the screen, opposite from the side fromwhich the user interacts with the screen. However, it is also feasibleto place the projector in the front of the screen, on the same sidewhere the user interaction occurs.

SUMMARY

Embodiments of the present invention relate to methods, apparatus, andcomputer readable media for detecting and tracking touch in an opticaltouch detection system. In one aspect, a method for touch detectionperformed by a touch processor in a optical touch detection system isprovided that includes receiving an image of an illuminated surfaceincluded in the optical touch detection system, wherein the image iscaptured by a camera included in the optical touch detection system,identifying highly saturated pixels in the image, identifying a set ofcandidate touch locations in the image, classifying the candidate touchlocations in the set of candidate touch locations to generate a set ofvalidated candidate touch locations, pruning the set of validatedcandidate touch locations based on the identified highly saturatedpixels to generate a set of final touch locations, wherein a validatedcandidate touch location is not included in the set of final touchlocations if the validated candidate touch location corresponds to ahighly saturated pixel, and outputting the set of final touch locations.

In one aspect, an optical touch detection system configured for touchdetection is provided that includes an illuminated surface, a camerapositioned to capture images of the illuminated surface, means forreceiving an image of the illuminated surface captured by the camera,means for identifying highly saturated pixels in the image, means foridentifying a set of candidate touch locations in the image, means forclassifying the candidate touch locations in the set of candidate touchlocations to generate a set of validated candidate touch locations,means for pruning the set of validated candidate touch locations basedon the identified highly saturated pixels to generate a set of finaltouch locations, wherein a validated candidate touch location is notincluded in the set of final touch locations if the validated candidatetouch location corresponds to a highly saturated pixel, and means foroutputting the set of final touch locations.

In one aspect, a computer readable medium storing software instructionsthat, when executed by a touch processor in an optical touch detectionsystem, cause the optical touch detection system to perform a method fortouch detection is provided. The method includes receiving an image ofan illuminated surface included in the optical touch detection system,wherein the image is captured by a camera included in the optical touchdetection system, identifying highly saturated pixels in the image,identifying a set of candidate touch locations in the image, classifyingthe candidate touch locations in the set of candidate touch locations togenerate a set of validated candidate touch locations, pruning the setof validated candidate touch locations based on the identified highlysaturated pixels to generate a set of final touch locations, wherein avalidated candidate touch location is not included in the set of finaltouch locations if the validated candidate touch location corresponds toa highly saturated pixel, and outputting the set of final touchlocations.

BRIEF DESCRIPTION OF THE DRAWINGS

Particular embodiments will now be described, by way of example only,and with reference to the accompanying drawings:

FIG. 1 is a high level block diagram of an example optical touchdetection system;

FIG. 2 is a block diagram illustrating touch detection in the touchprocessor of FIG. 1;

FIGS. 3A-3C are example filters;

FIG. 4 is a flow diagram of a method for touch detection in an opticaltouch detection system; and

FIGS. 5A-5F are an example.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Specific embodiments of the invention will now be described in detailwith reference to the accompanying figures. Like elements in the variousfigures are denoted by like reference numerals for consistency.

Embodiments of the invention provide for detection and localization ofan object (e.g., a finger or stylus) touching an illuminated surface.Computer vision analysis techniques are applied to the analysis ofimages of the illuminated surface captured by a camera to detect validtouch events as the events occur. Coordinates of identified touchlocations at each frame are provided for further processing in anapplication. Further, in some embodiments, touch locations are trackedover time for touch activated applications that need to know thetrajectory of a touch.

FIG. 1 is a high level block diagram of an example optical touchdetection system 100. The optical touch detection system 100 includes ascreen 102, an IR camera 104, a projector 106, one or more IR LEDs 108,a touch processor 110, and an application processor 112. The projector106 is placed behind the screen 102 and projects RGB video from theapplication processor 112 on the rear surface of the screen 102. Theprojector 106 may be any suitable projection system, such as, forexample, a digital light processing (DLP) projection system, a liquidcrystal display (LCD) projection system, or a liquid crystal on silicon(LCOS) projection system.

The IR light emitting diodes 108 are placed behind the screen 102 andarranged to flood IR light through the rear surface of the screen 102,with some IR light reflecting back from the screen 102. The IR camera104 is placed behind the screen and is arranged to capture a video of IRimages formed from the IR light impinging on the sensor. When an object,e.g., a finger, pen, etc., touches the surface of the screen 102, the IRimages (frames) in the video change in the location of the touch as theIR light transmitting through the screen 102 is reflected back at thetouch location and captured by the camera sensor. Further, the imageschange as objects an object, such as a user's hand, moves in front ofthe screen 102 within sufficient proximity to cause IR lightreflections.

The touch processor 110 receives IR video from the IR camera 104 andprocesses each frame to identify touch data such as touch locations,gestures, touch trajectory, etc. The operation of the touch processor110 to determine touch locations and to perform touch tracking isdescribed in more detail below in reference to FIG. 2.

The application processor 112 hosts applications available to a user ofthe optical touch detection system 100 and provides the RGB video, e.g.,a touch activated user interface, which is to be displayed on the screen102 by the projector 106. The application processor 112 receives touchdata from the touch processor 110 and uses the touch data to determinewhat, if any, actions are to be performed responsive to the touch data.For example, if the touch data indicates that a user has touched an icondisplayed on the screen 102, the application processor 112 may executean application associated with that icon, which in turn will cause theapplication processor 112 to change the content of the RGB video beingdisplayed in some application specific way.

FIG. 2 is block diagram illustrating touch detection and touch trackingperformed by the touch processor 110 of FIG. 1. The illustratedcomponents are used to process each frame of the IR video captured bythe IR camera 104. Note that the frames may be pre-processed prior tothe application of the touch detection and tracking. Such pre-processingmay include, for example, image smoothing, de-noising, combining pairsof images, etc. The components of the touch processor 110 utilized fortouch detection and localization include a saturated pixel detectioncomponent 202, a background modeling component 204, a candidate touchlocation identification component 206, and a pruning component 210. Thetouch processor 110 also includes a touch tracking component 212.

The saturated pixel detection component 202 operates to identify(segment) saturated (or near-saturated) pixels in the input image.Depending on the structure and material of the screen 102, an image ofthe reflected IR light may contain regions of bright specularreflections that appear as saturated (or near-saturated) pixels in theimage. If a touch aligns with pixels that are highly saturated, there isno differential modulation of the reflected IR light. If these saturatedimage regions were completely static, the background modeling processwould adequately handle these pixels. However, touch interaction withthe screen often causes the screen to flex, which causes small movementsin the image location of these specularities. Other factors such asextreme ambient temperature can also cause the screen to bend, therebycausing a drift in the location of the specular reflections. When thespecularity moves, it appears as a bright spot in the mean subtractedimage, and can result in a false positive. To handle potential falsepositives, it is important to identify regions of high specularity.

The saturated pixel detection component 202 may determine the locationsof highly saturated pixels using any suitable technique. In oneembodiment, the saturated pixel detection component 202 applies a highsaturation threshold, T_(s), to the image and identifies all pixels thatare above this threshold as being “saturated”. The intensity of a trulysaturated pixel is the maximum value permissible by the bit-depth of thecaptured image. For instance, in an 8-bit image, saturated pixels wouldhave a value of 255. The intensity of a truly saturated pixel as per thebit representation of the pixels in an image determines the upper boundon T_(s). To determine the lower bound, one approach is to empiricallydetermine the maximum expected intensity P from a valid touch event. Thethreshold T_(s) is then chosen such that P<T_(s)≦255, assuming an 8-bitpixel representation. The exact value of the threshold T_(s) may bedetermined by empirical evaluation of image data during a trainingphase. The saturated pixel detection component 202 may save the pixelsthat meet the specified criteria in a suitable data structure S, e.g., alist or an array.

The background modeling component 204 maintains an image of the neutral(no touch) state of the screen 102 surface to capture anynon-uniformities and artifacts that might exist in the IR lightreflecting from the screen 102 when no object is touching the screen.The background modeling component 204 may maintain this backgroundimage, also referred to as a mean image, using any suitable techniquefor background modeling. In one embodiment, the background modelingcomponent 204 computes the background image I_(B) using a technique inwhich the lowest intensity value at each pixel location is preserved asthe background image. As the IR camera 104 captures images, theintensity at each pixel of the input image is compared against theintensity of the corresponding pixel in the background image. If theinput pixel intensity is lower than the background pixel intensity, thevalue of the background pixel in the background image is changed to bethat of the input pixel; if not, the value of the background pixel isnot changed.

In one embodiment, the background modeling component 204 builds a singleGaussian model to capture the background image. That is, the backgroundmodeling component 204 maintains the mean and variance values for eachpixel of the input image. For each input frame, the background modelingcomponent 204 compares the Mahalanobis distance of the input image tothe mean image. If the Mahalanobis distance of a pixel is greater than athreshold, the pixel is flagged as a candidate foreground pixel. Foreach pixel that does not pass the threshold, the mean value and thevariance value are updated using an exponentially weighted update rule.In such embodiments, the background image I_(B) corresponds to the meanvalue of the each pixel. Additionally, a list, F, of pixels coordinatesthat correspond to the foreground for each input image is produced. TheMahalanobis distance is described in Mahalanobis, P., “On theGeneralised Distance in Statistics,” Proceedings of the NationalInstitute of Sciences of India, Vol. 2, No. 1, pp. 49-55, Apr. 16, 1936.The threshold used to separate foreground and background pixels may haveany suitable value and may be determined empirically.

The candidate touch location identification component 206 identifiespotential, i.e., candidate, touch locations, if any, in the image. Thecandidate touch location identification component 206 includes an imagesubtraction component 214, a filter component 216, a non-maximumsuppression component 218, and a classification component 208. For eachimage (frame), the image subtraction component 214 subtracts thebackground (mean) image maintained by the background modeling component204 from the input image. This subtraction compensates for backgroundartifacts and reduces their impact on the touch detection processingthat follows. The subtraction of the background image from the inputimage to generate a mean-subtracted image may be performed as per

I ₂ =I−I _(B)

I ₂(x,y)=0, if I ₂(x,y)<0

where I is the input image, I_(B) is the background image, and I₂ is theresulting image.

The filter component 216 convolves the mean-subtracted image I₂ with aspecially designed filter to generate the filtered image I_(f). Thefilter is designed to generate a high response at pixels that are at thecenter of a local region of high intensity surrounded by lower intensitypixels. FIGS. 3A-3C show examples of such filters. The filter in FIG. 2Ahas +1 and −1 as the coefficients. The filter in FIG. 3B has Gaussiandistributed weights that emphasize the center regions more than theedges. The filter in FIG. 3C is a Laplacian-of-Gaussian filter withlarge coefficients toward the center and smaller coefficients of theopposite sign towards the periphery. The filters are normalized toensure that the sum of the coefficients equals zero.

The size of the filter region with positive coefficients corresponds tothe expected size of a touch interaction, e.g., the expected size of afingertip. In some embodiments, the filter component 216 applies asingle filter, e.g., a filter such as those illustrated in FIGS. 3A and3B. In some embodiments, to better accommodate different finger touchsizes, the filter component 216 includes a bank of filters of differentsizes (or scales) and convolves the image with each filter. The filterwhich best matches the scale of the touch will generate the highestresponse. In order to compare the filter responses of filters ofdifferent scales, the filter definition is also scale normalized. Insome such embodiments, a scale-normalized Laplacian-of-Gaussian filtersuch as the example shown in FIG. 3C is used.

The non-maximum suppression component 218 identifies local maxima in thecombined filter response image from the filter component 216 using anon-maximum suppression technique. For example, each pixel may becompared to each pixel in a local neighborhood. If a pixel has a valuegreater than all of the neighboring pixels in the local neighborhood,that pixel is a local maximum, and its value and coordinates arepreserved. Any suitable size may be used for the pixel neighborhood. Thesize is implementation dependent and may be determined empirically. Theidentified local maxima are candidate touch locations.

If the filter component 216 uses a filter bank of multiple scales, thenon-maximum suppression is applied in both space (2D) and scale to findthe locally maximal response. In some embodiments, a 9×9 neighborhood inspace is considered, and, in scale, the adjacent neighbors areconsidered, i.e., the neighborhood is of size 9×9×3. If the filtercomponent 216 uses a filter of a single scale, the non-maximumsuppression is applied only in 2D space. In some such embodiments, a 9×9neighborhood is considered.

The classification component 208 operates to determine where or not thelocal maxima, i.e., the initial candidate touch locations, identified bythe non-maximum suppression component 218 are valid candidate touchlocations. In some embodiments, the classification component 208compares each local maxima against a detection threshold. The pixelsthat pass this threshold are considered to be valid candidate touchpixels. Any suitable threshold value may be used. The value of thethreshold may be determined empirically based on analyzing training datain which the filter response values from known touch and non-touchlocations are captured and compared.

In some embodiments, to compensate for non-uniformity in the overallbrightness of the infrared light over an image, the detection thresholdis spatially varying. As previously mentioned, depending on a number offactors such as the shape of the screen, the relative position of the IRLEDs and the IR camera, etc., the IR light from the screen may beconsiderably non-uniform in pixel intensity. Thus a touch occurring atdifferent regions of the screen may result in different filter responsevalues. If these differences are large, a single threshold may not besufficient to capture all valid candidate touch locations. Accordingly,in some such embodiments, each pixel location may be assigned athreshold that is a function of the pixel's brightness when touched.This spatially varying threshold may be determined, for example, via acalibration phase where a user touches the screen at a number oflocations, and the touch signal strength at these locations is capturedand interpolated in 2D over all the pixels of the image. The thresholdat a pixel can then be set at some fraction of the interpolated touchsignal strength at that pixel. Alternatively, in some such embodiments,rather than having a per-pixel threshold, the image may be divided intoa small number of relatively uniform regions. Each region (or sub-image)can then be assigned a single threshold using the techniques describedabove.

For applications in conditions of low ambient IR light (e.g., an indoorkiosk), the threshold-based classification described above is sufficientto discard almost all spurious candidate touch locations. However, whenthere is a high amount of ambient IR light, or in conditions of dynamicambient lighting (e.g., an automotive console), the threshold-basedclassification may be insufficient to eliminate some spurious candidatetouch locations.

Accordingly, in some embodiments, the classification component 208performs a further classification on the candidate touch locationsvalidated by the threshold-based classification to better compensate forsuch lighting conditions. More specifically, the classificationcomponent 208 classifies the remaining candidate touch locations using amachine learning classifier that classifies each candidate touchlocation as a valid or invalid touch location based on a combination ofcharacteristics (features) of the candidate touch location. In some suchembodiments, the machine learning classifier is used when high ambientIR light is detected by an ambient light sensor. Alternatively, in somesuch embodiments, the machine learning classifier is always used.

The features of a candidate touch location that may be considered by themachine learning classifier include a filter response value, the size ofthe candidate touch region, the shape of the candidate touch region, andthe texture of a local neighborhood around the candidate touch point.The filter response value r of a candidate touch location (x,y) is thevalue of the filter when applied by the filter component 216 at thetouch location in the filtered image, r=I_(f)(x,y). The size a of thecandidate touch region associated with a candidate touch location isdetermined by applying a threshold to the filtered image defined as anempirically determined fraction of the filter response r, i.e., a binaryimage is generated by evaluating I_(f)>r*C, where 0<C<1 (for, e.g.,C=0.75). The size (in pixels) is the number of “on” pixels in theresulting binary image that are connected to the candidate touchlocation.

The shape s of the touch region associated with a candidate touchlocation is also computed from this binary image, i.e., a descriptor ofthe shape formed by the “on” pixels connected to the candidate touchlocation is computed. Any suitable shape descriptor may be used, e.g.,compactness, elongation, rectangularity, etc. In one embodiment, theshape descriptor is eccentricity, which is a measure of the elongationof a shape. Eccentricity is a measure of how elongated a shape is and isdetermined as the ratio of the major axis to the length of the minoraxis of the best fitting ellipse of the shape. Any suitable techniquefor determining eccentricity may be used that results in a numberbetween 0 and 1 depending on whether the shape is a line or a perfectcircle.

The texture t of a candidate touch location is the texture of a localregion (neighborhood) centered on the touch location. Texturedescriptors capture the structure and/or contrast of the pixelintensities within the prescribed region. Any suitable texturedescriptor technique may be used. Depending on the descriptor techniqueused, the size of the texture descriptor may vary. In some embodiments,the texture descriptor used is based on the local binary patterndescribed in T. Ojala, et al., “Multiresolution Gray-Scale and RotationInvariant Texture Classification with Local Binary Patterns”, IEEETransactions on Pattern Analysis and Machine Intelligence, Vol. 24, No.7, July 2002, pp. 971-987 (“Ojala”). This texture descriptor is referredto as the local difference pattern (LDP) herein.

The LDP texture descriptor computes the relative strength of a centerpixel, e.g., a candidate touch location, against neighboring pixels. Theneighborhood of a candidate touch location is sampled along a circle ofradius d centered on the candidate touch location. The number of pointssampled along the circumference is determined by the angularquantization parameter, θ. For example, if θ=45, there will be 8 (360/45) points sampled from the neighborhood given by the coordinateoffsets [d*cos(θ*i), d*sin(θ*i)], for 0≦I<8, centered around thecandidate touch location. Depending on the values of d and θ, some ofthe sampled coordinate locations may not lie on integer pixelcoordinates. In this case, the intensity value at the sampledcoordinates may be estimated by interpolating between neighboring pixelvalues, or, the coordinates may be rounded to the nearest integerlocation. In some embodiments, θ=45, and d is set to the scale of thefilter which produced the highest filter response at that particularcandidate touch point. Typically, smaller values of θ result in moresamples, and the value is set based on empirical evaluation.

The LDP for a candidate touch location is an array of N values, where Nis the number of pixels in the neighborhood set. The value of LDP(n) maybe computed as

LDP(n)=I ₂(x,y)−I ₂(x _(n) ,y _(n))

where (x_(n), y_(n)) is the location of the nth pixel of the N pixels inthe neighborhood set. The order in which the N LDP values are stored isimportant. For an N element array, there are N possible orderingscreated by applying a circular shift to the elements of the array. Inorder to ensure that the LDP is invariant to rotation, all the Npossible LDP orderings are evaluated against a specific criterion, andthe best ordering is selected. For each ordering,

$Q = {{\sum\limits_{i = 1}^{N - 1}{LDP}_{i + 1}} - {LDP}_{i}}$

Is evaluated, and the ordering for the LDP which results in the smallestvalue of Q is selected.

In some embodiments, the values of LDP(n) are normalized by theintensity of the candidate touch location, i.e., LDP(n)=LDP(n)/I₂(x,y).In some embodiments, the LDP is quantized into a fixed set of coarserlevels to compensate for potential small changes in pixel intensityvariations. Note that depending on the radius and angular quantizationof the neighborhood, the size, N, of the LDP can vary. Further, in someembodiment, two or more concentric rings of LDP may be computed atdifferent distances from a candidate touch location. Assuming a fixed θ,each N element LDP is ordered based on the criterion describedpreviously. The individual LDPs are then concatenated to form the finaltexture descriptor.

The classification component 202 may use any suitable machine learningclassifier, such as, for example, a neural network or a support vectormachine. The machine learning classifier is trained to discriminatebetween true (valid) touch locations and false (invalid) touch locationsusing some combination of r, a, s, and t. The particular combination ofr, a, s, and t used for classification is an implementation choice. Forexample, assume the input to the machine learning classifier is afeature vector D. In some embodiments, D=[r a s t], i.e., the input tomachine learning classifier for each candidate touch location includesvalues for all four of the above features. In other embodiments, D is asubset of the four features, e.g., [r a t], [r a s], [a s t], [s t],etc. Given an input feature vector D for a candidate touch location, theoutput of the machine learning classifier is a value indicating whetheror not the candidate touch location is valid.

The pruning component 210 applies further criteria to the set ofvalidated candidate touch locations identified by the candidate touchlocation identification component 206 to remove any false positives thatmay present. There are several possible causes of false positives in thevalidated candidate touch locations. For example, although a usertouches a screen with only one finger, the user's other finger tips orknuckles are naturally quite close to the screen. The proximity of theseother parts of the hand to the screen can result in a high response tothe convolution kernel used by the filter component 216 which may beerroneously validated by the machine learning classifier and thusproduce false positives. False positives can also be caused by noise inthe IR sensor, non-uniform lighting of the screen surface, andspecularities in the reflected IR light field.

In some embodiments, the pruning component 210 compares each validatedcandidate touch location against the highly saturated pixels, if any,identified by the saturated pixel detection component 202. If avalidated candidate touch location is one of the highly saturatedpixels, the candidate touch location is pruned from the set of validatedcandidate touch locations.

In some embodiments, in addition to the above pruning, the pruningcomponent 210 applies further criteria to eliminate false positivescaused by the proximity of a user's hand to the display surface. Morespecifically, the additional pruning is performed in embodiments inwhich the background modeling component generates a list F of foregroundpixels in an image. In such embodiments, each validated candidate touchlocation is first compared against the list of foreground pixels F. If avalidated candidate touch location is not in this list, the candidatetouch location is pruned from the set of validated candidate touchlocations.

Each validated candidate touch location that has passed the abovepruning is then checked to verify that the candidate touch location isno further than a maximum distance, D, from the boundary of the blobformed by the foreground pixels, F. Any suitable technique may be usedto compute the distance of a candidate touch location from the boundary.In some embodiments, the distance is computed as follows. Initially, allthe coordinates in the foreground pixel list, F, are set to 1 in anotherwise black image (all pixels set to 0). Then, the distancetransform of this image is computed. The distance transform assigns toeach pixel the distance to the nearest 0 valued pixel. The distancetransform value of a candidate touch location (x,y) is read from thisimage, and compared against a threshold D. The threshold D is setempirically, and typically corresponds to the length of the major axisof the ellipse that fits the largest expected touch shape.

The touch tracking component 212 tracks detected touch locations overtime. In general, the touch tracking component 212 associates each touchlocation output by the pruning component 210 with a unique identifier(or label). At any time t, the touch tracking component 212 maintains aset of valid (or active) touch locations each of which are associatedwith a unique label. At time t+1, the touch detection process localizesa new set of one or more touch locations. The touch tracking component212 then searches for correspondences between the existing valid touchlocations from time t and the touch locations detected at t+1. Wherecorrespondences are found, labels from time t are propagated to thecorresponding new touch locations at t+1. If no correspondence is found,a new label is assigned to the touch location at t+1. With the help ofthe touch tracking component 212, the final output at each frame is atriple of the form {x,y,label} for each touch location present in theframe.

The tracking algorithm of the touch tracking component 212 employs aKalman filter, also referred to as linear quadratic estimation, to modelthe dynamics of the touch motion and Munkres' assignment algorithm todetermine frame-to-frame correspondences. Munkres' assignment algorithmis described in J. Munkres, “Algorithms for the Assignment andTransportation Problems,” Journal of the Society for Industrial andApplied Mathematics, Vol. 5, No. 1, pp. 32-38, March, 1957. A touchlocation is represented as a 2D location and has an associated Kalmanfilter. The state vector S of the filter is of dimension 4×1, S={x, y,vx, vy}, where vx and vy are the x and y components of the velocity andthe measurement (or observation) vector M is 2×1, M={x,y}.

The touch tracking component 212 uses Kalman filter prediction tocompute the expected location of all touch locations from frame t−1(denoted by P_(t-1)). The touch detection components generate new touchlocations for frame t (denoted by P_(t)). Assume that each of the touchlocations from frame t−1 has an associated label, while the touchlocations identified in frame t are not labelled. Let ∥P_(t-1)∥ be N,and ∥P_(t)∥ be M. A N×M distance matrix D is computed such that D(i,j)is the Euclidean distance between the ith location in P_(t-1) and thejth location in P_(t). The matrix D serves as the cost matrix forMunkres' assignment algorithm. Thus the cost of assigning location i toj is proportional to the distance between the two locations. Beforeusing D in the assignment algorithm, D is modified by setting all valuesof D greater than a threshold to infinity. This threshold captures themaximum expected displacement of a touch movement between t−1 and t.Setting all values of D greater than this threshold to infinity ensuresthat no valid solution of the assignment problem produces a result wheretwo locations separated by a distance greater than the threshold arematched together. Upon execution of Munkres algorithm, the touchtracking component 212 has determined the optimal assignment oflocations from P_(t-1) to P_(t) based on D.

Since N is not equal to M, not all touch locations between P_(t-1) andP_(t) will have valid assignments. The labels for the touch locationsfrom P_(t-1) that do have a valid assignment are carried over from framet−1 to the corresponding touch locations at frame t. The Kalman filtermeasurement vectors for these touch locations are also updated with thecoordinates of the matched locations from P_(t). Then, the touchtracking component 212 performs the Kalman filter update (or correction)step that reconciles the predicted state of the Kalman filter for eachtouch location with the new measurement coordinates and produces acorrected estimate of the location. The touch tracking component 212then updates the final position of the tracked locations with thecorrected estimates.

For the touch locations from P_(t-1) that do not have an assignment, thetouch tracking component 212 updates the position of each of theselocations based on the Kalman filter prediction step. The lack of anassignment could be due to a number of reasons such as noise orocclusions, that last only a few frames. The touch tracking component212 will update a touch location without an assignment for apredetermined number of consecutive frames before the touch location isdeleted. Allowing a touch location without an assignment to update for afew frames permits the system to recover from transitory detectionfailures. The number of consecutive frames is a tuning parameter thatmay be set to accommodate expected or known behavior.

For the touch locations from P_(t) that do not get an assignment fromMunkres' algorithm, the touch tracking component 212 creates new labelsand initializes new Kalman filters for the touch locations. These touchlocations are treated as new touch locations that are not associatedwith any currently tracked touch locations.

FIG. 4 is a flow diagram of a method for touch detection that may beexecuted in an optical touch detection system. The method may beexecuted on each frame (image) of a video stream captured by a camerapositioned to capture light reflections caused by objects approachingand/or touching the surface of a screen in the optical touch detectionsystem. Note that the frames may be pre-processed prior to theapplication of the method. Such pre-processing may include, for example,image smoothing, de-noising, combining pairs of images, etc.

Referring to FIG. 4, initially an image of the video stream is received400. High saturation pixels are then identified 402 in the image.Techniques that may be used for identification of high saturation pixelsare previously described herein in reference to the saturated pixeldetection component 202 of FIG. 2. The background model is also updated403 based on the input image. Techniques that may be used to generateand maintain a suitable background model are previously described hereinin reference to the background modeling component 204 of FIG. 2.

Initial candidate touch locations are also identified 404 in the image.Techniques that may be used to identify initial candidate touchlocations are previously described herein in reference to the candidatetouch location identification component 206 of FIG. 2. Note that theinitial candidate touch locations may be identified from amean-subtracted image generated by subtracting the background (mean)image from the input image.

The set of initial candidate touch locations is then classified 406 toidentify a set of valid candidate touch locations from the initial setof candidate touch locations. Techniques that may be used forclassification of the initial candidate touch locations are previouslydescribed herein in reference to the classification component 208 ofFIG. 2. The set of validated candidate touch locations is then pruned408 to remove any false positives and generate the final set of touchlocations. Techniques that may be used for pruning of the set ofvalidated candidate touch locations are previously described herein inreference to the pruning component 210 of FIG. 2. The x,y coordinates ofthe touch locations in the final set are then output 410 for use infurther processing, e.g., for touch tracking as described herein and/orfor processing in an application associated with a touch location in thefinal set.

FIGS. 5A-5F are an example illustrating the state of an image at variouspoints during the touch detection processing as described herein. Allfive fingers of hand are touching the surface of a screen in an opticaltouch detection system implementing an embodiment of the method of FIG.4. FIG. 5A shows an example input image. Note the various intensities ofthe light reflections causes by the fingers and palm of the hand. FIG.5B shows the mean (background) image. FIG. 5C shows the binaryforeground image computed during the process of estimating thebackground mean image using the previously described single Gaussianapproach. FIG. 5D shows the mean-subtracted image used for candidationtouch location identification. FIG. 5E shows the filtered image and FIG.5F shows the final identified touch locations.

Other Embodiments

While the invention has been described with respect to a limited numberof embodiments, those skilled in the art, having benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the invention as disclosed herein.

For example, embodiments are described herein in which IR LEDs providethe light source and an IR camera is used to capture the images. One ofordinary skill in the art will understand embodiments in which the lightsource produces light in other than the IR band and the correspondingimaging sensor is tuned to this light. As is well known, there are twomain criteria for choosing a suitable light source: 1) the light shouldbe within a narrow band in the electro-magnetic spectrum so that thesensor (camera) can be tuned to detect only that specific band of lightenergy, and 2) if visible light is projected on the screen, for, e.g., avisible user interface, the light used for touch detection should bedistinct from the visible light spectrum so that the projected RGB videodoes not interfere with the touch detection process.

In another example, embodiments are described herein in which the lightsource, camera, and projector are positioned behind the touch surface.One of ordinary skill in the art will understand embodiments in whichthe light source, camera, and projector are suitably positioned in frontof the touch surface and/or behind the touch surface. For example, theprojector may be positioned in front of the touch screen while thecamera and IR light source are placed behind the screen.

In another example, embodiments are described herein in which aprojector is used to project a user interface on a display screen. Oneof ordinary skill in the art will understand embodiments in which aprojector is not used. For example, in some low-cost touch systems withfixed functionality, the user interface may be directly “painted” ontothe display screen and does not change. When a user touches one of the“buttons” on the display screen, the touch location may be determinedfrom an image as described herein and an application may be triggeredresponsive to the identified touch location to, e.g., deliver a selectedproduct or to capture a photograph or to increase a temperature or togenerate a sound, or to issue a ticket or to dim a light or to summon awaiter, etc.

In another example, embodiments are described herein in whichnon-maximum suppression is used to identify local maxima in a filteredimage, the local maxima forming the initial set of candidate touchlocations. One of ordinary skill in the art will understand embodimentsin which local minima are identified using non-minima suppressioninstead of identifying local maxima, the local minima forming theinitial set of candidate touch locations. Local minima and local maximamay be referred to as local extrema.

Embodiments of the methods, the application processor 112, and the touchprocessor 110 of FIG. 1, and the components of the touch processor 110described herein may be implemented in hardware, software, firmware, orany suitable combination thereof, such as, for example, one or moredigital signal processors (DSPs), microprocessors, discrete logic,application specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), etc. The application processor 112 and the touchprocessor 110 may be separate processors or may be implemented as asingle system on a chip (SoC) such as an Open Multimedia ApplicationPlatform (OMAP) SoC available from Texas Instruments, Inc. Any softwareinstructions may be initially stored in a computer-readable medium andloaded and executed in a processor. In some cases, the softwareinstructions may also be sold in a computer program product, whichincludes the computer-readable medium and packaging materials for thecomputer-readable medium. In some cases, the software instructions maybe distributed via removable computer readable media, via a transmissionpath from computer readable media on another digital system, etc.Examples of computer-readable media include non-writable storage mediasuch as read-only memory devices, writable storage media such as disks,flash memory, memory, or a combination thereof.

Although method steps may be presented and described herein in asequential fashion, one or more of the steps shown in the figures anddescribed herein may be performed concurrently, may be combined, and/ormay be performed in a different order than the order shown in thefigures and/or described herein. Accordingly, embodiments should not beconsidered limited to the specific ordering of steps shown in thefigures and/or described herein.

It is therefore contemplated that the appended claims will cover anysuch modifications of the embodiments as fall within the true scope ofthe invention.

What is claimed is:
 1. A method for touch detection performed by a touchprocessor in an optical touch detection system, the method comprising:receiving an image of an illuminated surface comprised in the opticaltouch detection system, wherein the image is captured by a cameracomprised in the optical touch detection system; identifying highlysaturated pixels in the image; identifying a set of candidate touchlocations in the image; classifying the candidate touch locations in theset of candidate touch locations to generate a set of validatedcandidate touch locations; pruning the set of validated candidate touchlocations based on the identified highly saturated pixels to generate aset of final touch locations, wherein a validated candidate touchlocation is not included in the set of final touch locations if thevalidated candidate touch location corresponds to a highly saturatedpixel; and outputting the set of final touch locations.
 2. The method ofclaim 1, wherein identifying highly saturated pixels comprises comparingeach pixel in the image to a predetermined high saturation threshold andidentifying pixels above the high saturation threshold as highlysaturated pixels.
 3. The method of claim 1, wherein pruning the set ofvalidated candidate touch locations further comprises: removing avalidated candidate touch location from the set of validated candidatetouch locations when the validated candidate touch location is not in aset of foreground pixels in the image; and removing a validatedcandidate touch location from the set of validated candidate touchlocations when the validated candidate touch location is outside amaximum distance from a boundary of a blob formed by the foregroundpixels.
 4. The method of claim 1, wherein classifying the candidatetouch locations comprises using a machine learning classifier toclassify each candidate touch location as valid or invalid, wherein themachine learning classifier is trained to classify a candidate touchlocation based on a combination of features of the candidate touchlocation.
 5. The method of claim 4, wherein the combination of featurescomprises at least one feature selected from a group of featuresconsisting of a filter response value of the candidate touch location, asize of a touch region corresponding the candidate touch location, ashape of the touch region corresponding of the candidate touch location,and a texture of a neighborhood of pixels around the candidate touchlocation.
 6. The method of claim 4, wherein the combination of featuresconsists of a filter response value of the candidate touch location, asize of a touch region corresponding the candidate touch location, ashape of the touch region corresponding of the candidate touch location,and a texture of a neighborhood of pixels around the candidate touchlocation.
 7. The method of claim 1, wherein classifying the candidatetouch locations comprises comparing each pixel to a predetermineddetection threshold.
 8. The method of claim 1, wherein classifying thecandidate touch locations comprises comparing each pixel to apredetermined detection threshold, the predetermined pixel thresholdcorresponding to a location of the pixel, wherein a predetermineddetection threshold for a first pixel location is different from apredetermined detection threshold for a second pixel location.
 9. Themethod of claim 1, wherein identifying a set of candidate touchlocations comprises: subtracting a background model from the image togenerate a mean-subtracted image; filtering the mean-subtracted imagewith a filter having zero mean with coefficients of a same sign in acenter of the filter surrounded by coefficients of an opposite sign suchthat a size of a central region corresponds to an expected size of afinger touch; and identifying local extrema in the filteredmean-subtracted image.
 10. The method of claim 1, wherein the camera isan infrared camera.
 11. The method of claim 1, further comprising:tracking the final touch locations, wherein tracking comprises: usingKalman filter prediction to compute an expected location of each touchlocation from a previous image; and using Munkres' assignment algorithmto determine which touch locations of the final touch locationscorrespond to touch locations from the previous image.
 12. An opticaltouch detection system configured for touch detection, the systemcomprising: an illuminated surface; a camera positioned to captureimages of the illuminated surface; means for receiving an image of theilluminated surface captured by the camera; means for identifying highlysaturated pixels in the image; means for identifying a set of candidatetouch locations in the image; means for classifying the candidate touchlocations in the set of candidate touch locations to generate a set ofvalidated candidate touch locations; means for pruning the set ofvalidated candidate touch locations based on the identified highlysaturated pixels to generate a set of final touch locations, wherein avalidated candidate touch location is not included in the set of finaltouch locations if the validated candidate touch location corresponds toa highly saturated pixel; and means for outputting the set of finaltouch locations.
 13. The optical touch detection system of claim 12,wherein the means for identifying highly saturated pixels compares eachpixel in the image to a predetermined high saturation threshold andidentifies pixels above the high saturation threshold as highlysaturated pixels.
 14. The optical touch detection system of claim 12,wherein the means for classifying the candidate touch locationscomprises a machine learning classifier to classify each candidate touchlocation as valid or invalid, wherein the machine learning classifier istrained to classify a candidate touch location based on a combination offeatures of the candidate touch location.
 15. The optical touchdetection system of claim 14, wherein the combination of featurescomprises at least one feature selected from a group of featuresconsisting of a filter response value of the candidate touch location, asize of a touch region corresponding the candidate touch location, ashape of the touch region corresponding of the candidate touch location,and a texture of a neighborhood of pixels around the candidate touchlocation.
 16. The optical touch detection system of claim 12, whereinthe means for classifying the candidate touch locations compares eachpixel to a predetermined detection threshold, the predetermined pixelthreshold corresponding to a location of the pixel, wherein apredetermined detection threshold for a first pixel location isdifferent from a predetermined detection threshold for a second pixellocation.
 17. The optical touch detection system of claim 12, whereinthe means for identifying a set of candidate touch locations comprises:means for subtracting a background model from the image to generate amean-subtracted image; means for filtering the mean-subtracted imagewith a filter having zero mean with coefficients of a same sign in acenter of the filter surrounded by coefficients of an opposite sign suchthat a size of a central region corresponds to an expected size of afinger touch; and means for identifying local extrema in the filteredmean-subtracted image.
 18. The optical touch detection system of claim12, wherein the camera is an infrared camera.
 19. The optical touchdetection system of claim 12, further comprising: means for tracking thefinal touch locations, wherein the means for tracking comprises: meansfor using Kalman filter prediction to compute an expected location ofeach touch location from a previous image; and means for using Munkres'assignment algorithm to determine which touch locations of the finaltouch locations correspond to touch locations from the previous image.20. A computer readable medium storing software instructions that, whenexecuted by a touch processor comprised in an optical touch detectionsystem, cause the optical touch detection system to perform a method fortouch detection, the method comprising: receiving an image of anilluminated surface comprised in the optical touch detection system,wherein the image is captured by a camera comprised in the optical touchdetection system; identifying highly saturated pixels in the image;identifying a set of candidate touch locations in the image; classifyingthe candidate touch locations in the set of candidate touch locations togenerate a set of validated candidate touch locations; pruning the setof validated candidate touch locations based on the identified highlysaturated pixels to generate a set of final touch locations, wherein avalidated candidate touch location is not included in the set of finaltouch locations if the validated candidate touch location corresponds toa highly saturated pixel; and outputting the set of final touchlocations.